"""


"""
from django.contrib.auth.models import Group
from rest_framework import viewsets
from rest_framework.generics import ListAPIView

from meiduo_admin.my_pagination import MyPageNumberPagination
from meiduo_admin.serializers.admin_manage_serializers import AdminManageSerializer, GroupSimpleSerializer
from users.models import User


class AdminManageView(viewsets.ModelViewSet):
    serializer_class = AdminManageSerializer
    pagination_class = MyPageNumberPagination
    queryset = User.objects.filter(is_staff=True, is_superuser=True).order_by("id")


class GroupSimpleView(ListAPIView):
    serializer_class = GroupSimpleSerializer
    # pagination_class = MyPageNumberPagination
    queryset = Group.objects.all()
